package main

import (
	"fmt"
	"io/ioutil"
	"net/http"
)

func main7() {

	resp, err := http.Get("https://studygolang.com/readings/recent?limit=1")

	if err != nil {
		fmt.Println(err)
		return
	}

	defer resp.Body.Close()
	body, _ := ioutil.ReadAll(resp.Body)
	fmt.Println(string(body))

	//request, err := http.NewRequest("DELETE", "http://www.test.com/delete/1", nil)
	//if err != nil {
	//	fmt.Println("创建请求失败", err)
	//}
	//
	//http.DefaultClient.Do(request)

}
